tsteven4 [Wed, 24 Nov 2021 18:30:58 +0000 (10:30 -0800)]
further minimize xcsv_get_char_from_constant_table
tsteven4 [Wed, 24 Nov 2021 17:51:14 +0000 (09:51 -0800)]
use list initialization to construct xcsv char map table.
tsteven4 [Wed, 24 Nov 2021 16:52:22 +0000 (08:52 -0800)]
more nits.
tsteven4 [Wed, 24 Nov 2021 00:09:14 +0000 (16:09 -0800)]
limit variable scope, found by LGTM.
Poor global variable name 'ops'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo).
tsteven4 [Sun, 21 Nov 2021 21:04:55 +0000 (14:04 -0700)]
Introduce resampling filter and nvectors. (#763)
* Introduce resampling filter and nvectors.
* use ellipsoid model with nvectors.
the code had been forcing a spherical earth model to match the
existing grtcirc.cc calculations.
tsteven4 [Sun, 21 Nov 2021 21:04:03 +0000 (14:04 -0700)]
improve string handling, fix 9 year old FIXME. (#769)
tsteven4 [Sun, 21 Nov 2021 20:34:23 +0000 (13:34 -0700)]
support generation of xcode project files with qmake. (#760)
tsteven4 [Sat, 20 Nov 2021 15:05:01 +0000 (08:05 -0700)]
update fit locations test with improved sample (#767)
* update fit test with improved sample.
* reference file mode correction.
tsteven4 [Fri, 19 Nov 2021 13:48:53 +0000 (06:48 -0700)]
Pick up fit locations test case (#766)
* Add support for Locations.fit files
* patch by tsteven4 to address review comments
* Add a test case for Locations.fit files from Garmin devices
Co-authored-by: Fabrizio Gennari <fabrizio.ge@tiscali.it>
tsteven4 [Thu, 18 Nov 2021 23:40:49 +0000 (16:40 -0700)]
add test for fit Locations(Lctns) files. (#765)
* add test for fit Locations(Lctns) files.
* fix new bug with change in Qt6 behavior for fit.
fabzzap [Thu, 18 Nov 2021 21:07:59 +0000 (22:07 +0100)]
Add support for Locations.fit files (#762)
* Add support for Locations.fit files
* patch by tsteven4 to address review comments
tsteven4 [Wed, 17 Nov 2021 15:52:08 +0000 (08:52 -0700)]
Eliminiate redundant route_head data member (#764)
eliminate redundant route_head data member rte_waypt_ct, replacing it with a member function rte_waypt_ct() that gets the count from the waypoint_list container.
tsteven4 [Mon, 8 Nov 2021 12:22:30 +0000 (05:22 -0700)]
kill xmap, xmap2006. (#758)
* kill xmap, xmap2006.
* dprecate obsolete readme.
tsteven4 [Fri, 5 Nov 2021 21:13:05 +0000 (15:13 -0600)]
kill xmapwpt. (#757)
note is was wounded previously, see #754.
tsteven4 [Fri, 5 Nov 2021 19:01:00 +0000 (13:01 -0600)]
add fedora 35 to CI. (#756)
tsteven4 [Fri, 5 Nov 2021 17:17:45 +0000 (11:17 -0600)]
serial port names (#755)
* try qserialportinfo again.
* update docker images with qt serial port.
* enhance windows device text to match device manager on windows.
tsteven4 [Thu, 4 Nov 2021 14:02:09 +0000 (08:02 -0600)]
optimize speed and distance conversions. (#753)
* optimize speed and distance conversions.
structure constexpr conversions such that a minimal amount of
arithmetic is done at run time and avoiding run time division.
add tests for conversions.
* correct bug with display of accumulated path distance.
and add test case of same.
tsteven4 [Tue, 2 Nov 2021 17:30:10 +0000 (11:30 -0600)]
retire TopoMapPro Places File format (#711)
* retire TopoMapPro Places File format.
* remove topomap pro reference files.
* catch serialization references up with tmpro retirement.
tsteven4 [Mon, 1 Nov 2021 17:19:20 +0000 (11:19 -0600)]
update codacy badge.
tsteven4 [Mon, 1 Nov 2021 16:21:24 +0000 (10:21 -0600)]
update Qt 5.12 builds on macos and windows to 5.12.11 (#752)
* update windows, macos Qt 5.12 builds to 5.12.11
* fool around with macos qt install path
* more fooling with macos qt path
* try macos qt path fix yet again
Robert Lipe [Mon, 1 Nov 2021 06:41:11 +0000 (01:41 -0500)]
Eliminate internal copy/free inside navilink. (#751)
* C++ improvements inside Vcard. Add test.
* Eternal impedance mismatch on C vs C++ pointer ownership.
Robert Lipe [Mon, 1 Nov 2021 05:49:57 +0000 (00:49 -0500)]
C++ improvements in VCard. Add tests. (#750)
* C++ improvements inside Vcard. Add test.
* Eternal impedance mismatch on C vs C++ pointer ownership.
* VCF: Incorporate review feedback: auote ','. Match HTML tage regardless of case.
* Quote commas in ASCII source, not just UTH8-encoded text.
tsteven4 [Sat, 30 Oct 2021 14:14:11 +0000 (08:14 -0600)]
workaround github cache output issues. (#749)
a cache hit is reported only for an exact match. But in a pull
request we can have an inexact match result in cache being fetched.
tsteven4 [Fri, 29 Oct 2021 00:24:00 +0000 (18:24 -0600)]
fix windows release with Qt6. (#748)
* fix windows release with Qt6.
windeployqt failed to deploy Qt6Core5Compat.dll because it was
not used by the gui and we didn't tell windeployqt there was
another executable to scan for dependencies.
* fiddle with github cache conditionals.
cache was restored, but we tried to install qt anyway.
* Revert "fiddle with github cache conditionals."
This reverts commit
fece79e5e56de2f957960236bb851c6bc7682d7c.
* try to get github action conditionals working again.
* Revert "try to get github action conditionals working again."
This reverts commit
3152108e5267580f3836b9f6aadc7dfa2ecfe347.
* work around apparent bug in github action conditonal processing.
* the second half of the workaround
* fool around with bash
* more bash foolishness.
tsteven4 [Wed, 27 Oct 2021 15:42:09 +0000 (09:42 -0600)]
kill appveyor 5.9 build
tsteven4 [Wed, 27 Oct 2021 13:43:25 +0000 (07:43 -0600)]
update Qt6 builds to 6.2.1 (#747)
tsteven4 [Tue, 26 Oct 2021 19:49:48 +0000 (13:49 -0600)]
Add support for Qt6. (#739)
* Add support for Qt6.
* fix a few codacy complaints.
tsteven4 [Tue, 26 Oct 2021 19:06:17 +0000 (13:06 -0600)]
update fedora images dropping libusb versions before 1.0 (#746)
tsteven4 [Mon, 25 Oct 2021 11:26:34 +0000 (05:26 -0600)]
update included libusb for mac to 1.0.24 (#744)
tsteven4 [Mon, 25 Oct 2021 00:15:15 +0000 (18:15 -0600)]
replace the last uses of QRegExp. (#743)
also, correct the discard documentation. The given example didn't
work in recent releases.
tsteven4 [Sat, 23 Oct 2021 20:18:29 +0000 (14:18 -0600)]
update packages names in doc. (#745)
tsteven4 [Sat, 23 Oct 2021 18:51:48 +0000 (12:51 -0600)]
update document. (#741)
update build chapter to reflect current builds.
update dtd to 4.5.
correct manual page document syntax and missing items.
tsteven4 [Wed, 20 Oct 2021 13:14:17 +0000 (07:14 -0600)]
obfuscate map key (#740)
* obfuscate map key.
* keep js debug turned off.
tsteven4 [Fri, 15 Oct 2021 00:29:54 +0000 (18:29 -0600)]
fix an out of bounds access to a QString in tpo. (#738)
This was caught with Qt6.2.0, which has an assertion to check for
out of bounds access.
ASSERT: "i >= 0 && i < size()" in file .../Qt-6.2.0/6.2.0/gcc_64/include/QtCore/qstring.h, line 1325
tsteven4 [Thu, 14 Oct 2021 21:14:33 +0000 (15:14 -0600)]
try harder to fix contious release tags. (#737)
tsteven4 [Thu, 14 Oct 2021 18:03:06 +0000 (12:03 -0600)]
fix sha on continous releases from github. (#736)
tsteven4 [Thu, 14 Oct 2021 14:57:45 +0000 (08:57 -0600)]
Merge pull request #735 from tsteven4/pr643fixestry2
tpo fixes for #643
tsteven4 [Thu, 14 Oct 2021 13:04:51 +0000 (07:04 -0600)]
use constexpr for debug code in tpo.
tsteven4 [Thu, 14 Oct 2021 12:37:22 +0000 (06:37 -0600)]
run astyle on tpo.cc
tsteven4 [Thu, 14 Oct 2021 12:36:25 +0000 (06:36 -0600)]
fix codacy flagged %d in format string mismatch.
%d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
SRE-babel [Wed, 13 Oct 2021 15:13:03 +0000 (08:13 -0700)]
Update tpo.cc (#643)
Some .tpo file tracks were/are parsed such that wild jumps occur in lat/lon, creating invalid coords which were not caught by output routines. Some logic flaws and int size errors have been fixed, but some tracks still contain invalid points. Tracks not corrected by this patch now result in warning messages to STDOUT. Entirely valid tracks will also generate warnings if lat or lon changes by a full degree between adjacent track points (should never happen). Non-fatal warning allows manual removal of the few bad track points in an output format like GPX. Damage is apparently limited to half a dozen incremental points before the next full point, but that can't be guaranteed.
Co-authored-by: tsteven4 <13596209+tsteven4@users.noreply.github.com>
tsteven4 [Wed, 13 Oct 2021 13:17:09 +0000 (07:17 -0600)]
don't set gpsbabel::XmlStreamWriter codec in mapfactor (#733)
We use utf-8 by default as of #671.
tsteven4 [Tue, 12 Oct 2021 22:10:16 +0000 (16:10 -0600)]
Merge pull request #732 from tsteven4/qtprep103
Qt 6 compatiblity changes
tsteven4 [Tue, 12 Oct 2021 21:20:35 +0000 (15:20 -0600)]
avoid std::min with QString::size
missed one in previous commit.
tsteven4 [Tue, 12 Oct 2021 18:56:55 +0000 (12:56 -0600)]
don't include QCharRef.
missed one in previous commit.
tsteven4 [Tue, 12 Oct 2021 18:50:48 +0000 (12:50 -0600)]
Merge pull request #731 from tsteven4/qt6prep102
compatible changes for Qt6
tsteven4 [Tue, 12 Oct 2021 17:54:03 +0000 (11:54 -0600)]
don't include QByteRef.
It is gone in Qt6. It was not documented as a class in Qt5.
In Qt5 QByteRef just included qbytearray.h.
tsteven4 [Tue, 12 Oct 2021 17:53:04 +0000 (11:53 -0600)]
don't include QCharRef.
It is gone in Qt6. It was a "helper class for QString". It was not
documented as a class in Qt5. In Qt5 QCharRef just included qstring.h.
tsteven4 [Tue, 12 Oct 2021 16:57:14 +0000 (10:57 -0600)]
don't include QStaticStringData.
missed one in the previous commit.
tsteven4 [Tue, 12 Oct 2021 16:00:21 +0000 (10:00 -0600)]
Merge pull request #730 from tsteven4/qt6prep101
compatible changes for Qt6
tsteven4 [Tue, 12 Oct 2021 15:12:43 +0000 (09:12 -0600)]
accomodate the deletion of QDateTime::toTime_t in Qt6.
tsteven4 [Tue, 12 Oct 2021 13:22:24 +0000 (07:22 -0600)]
don't include QStaticStringData.
It goes away in Qt6. Besides, the documented include is QString,
which in Qt 5 will include qstringliteral.h just as QStaticStringData
does.
tsteven4 [Tue, 12 Oct 2021 13:18:55 +0000 (07:18 -0600)]
avoid std::min with QString::size, which
changes types in Qt6.
tsteven4 [Sun, 10 Oct 2021 21:54:44 +0000 (15:54 -0600)]
migrate from QRegExp to QRegularExpression. (#729)
tsteven4 [Mon, 4 Oct 2021 19:17:19 +0000 (13:17 -0600)]
compatible fixes for qt6 warnings and conflicts. (#728)
* quite qt6 yammering about foreach.
* avoid name collision with Qt6.
* fix warning: type qualifiers ignored on cast result type
tsteven4 [Mon, 4 Oct 2021 17:21:42 +0000 (11:21 -0600)]
Don't use Qt module names in include directives. (#727)
This simplifies migration to Qt6 where some classes moved.
This was done mostly by an ed script, although mkstyle.sh took some
hand holding.
1,$g/#include <QtCore\// s/<QtCore\/\([^>]*\)>/<\1> /
1,$g/#include <QtGui\// s/<QtGui\/\([^>]*\)>/<\1> /
1,$g/#include <QtNetwork\// s/<QtNetwork\/\([^>]*\)>/<\1> /
1,$g/#include <QtWidgets\// s/<QtWidgets\/\([^>]*\)>/<\1> /
1,$g/ *$/ s/ *$//
w
q
tsteven4 [Wed, 29 Sep 2021 15:46:00 +0000 (09:46 -0600)]
more qstringview work for qt6. (#726)
tsteven4 [Tue, 28 Sep 2021 12:22:36 +0000 (06:22 -0600)]
update gui/gpx.cc to use QStringView for Qt6. (#725)
tsteven4 [Mon, 27 Sep 2021 19:56:00 +0000 (13:56 -0600)]
pass QStringViews by value, not const reference. (#724)
As recommended in the QStringView documentation.
tsteven4 [Mon, 27 Sep 2021 19:09:18 +0000 (13:09 -0600)]
fixes for #722, Mechanically remove QStringRef use for QStringView to help with Qt6. (#723)
* Fix typo in maggeo from search-and-replace work earlier.
* Revert startOfDate() calls to keep floor at 5.12.x to keep builders happy. :-/
* Explictly get QString from StringView in gpx for compat with older Qt builds.
Co-authored-by: Robert Lipe <robertlipe@gmail.com>
GPSBabel [Wed, 22 Sep 2021 04:16:30 +0000 (23:16 -0500)]
Mechanically remove QStringRef use for QStringView to help with Qt6. (#722)
* Make more string literals encoded at UTF-16 (bloaty-bytes) to
reduce conversions.
* Favor QStringView(Qt6-ism that mirrors C++ standard std::stringview)
over QStringRef (Qt5 hack).
Co-authored-by: Robert Lipe <robertlipe@gmail.com>
tsteven4 [Mon, 20 Sep 2021 16:18:40 +0000 (10:18 -0600)]
don't limit simplify count maximum in GUI (#721)
Robert Lipe [Mon, 13 Sep 2021 22:32:51 +0000 (17:32 -0500)]
Remove Bushnell and Bushnell_trl formats.
These were added in 2009 when Onix unit were on firesale at places like Woot
as Bushnell had just exited the handheld GPS space. There was a flurry of
activity by a low number of users, followed by years of silence beyond
maintenance burden.
tsteven4 [Wed, 19 May 2021 20:58:23 +0000 (14:58 -0600)]
fix map preview bug that dropped tracks with 2 pts. (#714)
tsteven4 [Sun, 9 May 2021 18:34:42 +0000 (12:34 -0600)]
add fedora 34 to CI (#713)
Robert Lipe [Sat, 17 Apr 2021 01:15:29 +0000 (20:15 -0500)]
Minorfixes to "new" gtm_stringread() functions to eliminate leading and trailing spaces (#710)
* Trim more uses of C date and potentially unsafe memory practices.
* Add warning fixes for garmin_xt and exif
Robert Lipe [Thu, 15 Apr 2021 23:21:39 +0000 (18:21 -0500)]
Merge pull request #664 from GPSBabel/reaper
Remove dead formats: alan, an1, netstumbler, naviguide.
tsteven4 [Tue, 13 Apr 2021 17:33:53 +0000 (11:33 -0600)]
restore lost format options when using positional parameters (#709)
* restore format options with positional parameters.
* fix positional test
tsteven4 [Mon, 29 Mar 2021 14:09:22 +0000 (08:09 -0600)]
Merge pull request #707 from GPSBabel/pvs
PVS-Studio fixes
Robert Lipe [Mon, 29 Mar 2021 03:54:54 +0000 (22:54 -0500)]
Bring back some of the files I nuked and move them to deprecated/
tsteven4 [Wed, 24 Mar 2021 14:16:24 +0000 (08:16 -0600)]
fix some format mismatches found by PVS-Studio
V576 Incorrect format. Consider checking the second actual argument of the 'asprintf' function. The SIGNED integer type argument is expected.
QString::asprintf is not recommended for new code anyway.
tsteven4 [Tue, 23 Mar 2021 18:58:39 +0000 (12:58 -0600)]
fix erroneous Qt translation caught by PVS studio.
V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing.
This makes me wonder if this code is ever used. If args == "OutputFromUnit"
it would throw a fatal error since
b9cdbe4e8dc02cff07af9e0fa28adb2372337963 Oct 22, 2013
tsteven4 [Tue, 23 Mar 2021 18:40:06 +0000 (12:40 -0600)]
fix sequence related undefined behavior found by PVS Studio.
V567 The modification of the 's' variable is unsequenced relative to another operation on the same variable. This may lead to undefined behavior.
tsteven4 [Tue, 23 Mar 2021 15:46:42 +0000 (09:46 -0600)]
pvs fix
V668 There is no sense in testing the 'wpt_tmp' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
tsteven4 [Mon, 22 Mar 2021 17:53:18 +0000 (11:53 -0600)]
fix another pvs warning
V758 The 'pos' reference becomes invalid when temporary object returned by a function is destroyed.
tsteven4 [Sat, 20 Mar 2021 12:57:41 +0000 (06:57 -0600)]
fix ancient memory leak in filter_vecs. (#706)
tsteven4 [Fri, 19 Mar 2021 21:02:28 +0000 (15:02 -0600)]
another pvs studio find
↑ V547 Expression is always false.
tsteven4 [Fri, 19 Mar 2021 14:53:45 +0000 (08:53 -0600)]
PVS Studio kills an old bug.
V1064 The '360' operand of integer division is less than the '65535' one. The result will always be zero.
Also, we need to set the flag for course.
tsteven4 [Mon, 15 Mar 2021 20:32:54 +0000 (14:32 -0600)]
make some Qt containers const. (#705)
This avoids checks for detachment.
tsteven4 [Mon, 15 Mar 2021 13:04:10 +0000 (07:04 -0600)]
fix Qt6 deprecation warning in mapbar_track. (#703)
* fix Qt6 deprecation warning in mapbar_track.
"warning: 'fromUtf16' is deprecated: Use char16_t* overload."
However, it is recommended to use QString(const QChar *, int) or
QString(const QChar *) instead of
QString::fromUtf16(const ushort *unicode, int size = -1) and
QString::fromUtf16(const char16_t *str, int size = -1) anyway.
* fix Either the condition 'track==nullptr' is redundant or there is possible null pointer dereference.
as this isn't using a non-throwing allocation function memory allocation
errors will cause std::bad_alloc to be thrown anyway, we won't return
with track == nullptr.
* eliminate another non-functional memory check.
tsteven4 [Mon, 15 Mar 2021 13:03:34 +0000 (07:03 -0600)]
fix Wmissing-field-initializers. (#704)
These appear with Qt6 on macos which enables Wextra.
tsteven4 [Thu, 11 Mar 2021 20:44:35 +0000 (13:44 -0700)]
use default parameter instead of QString::KeepEmptyParts, (#702)
simplifying migration to Qt6.
Andreas Vögele [Mon, 8 Mar 2021 13:08:50 +0000 (14:08 +0100)]
Parse empty gx:coord elements in KML reader (#701)
Add test for empty gx:coord elements
tsteven4 [Thu, 4 Mar 2021 23:13:42 +0000 (16:13 -0700)]
modernize nmea reader (#700)
tsteven4 [Wed, 3 Mar 2021 20:35:49 +0000 (13:35 -0700)]
use object tree to cleanup UpgradeCheck, UpgradeCheck::manager_ and (#692)
UpgradeCheck::replyId.
tsteven4 [Wed, 3 Mar 2021 16:53:39 +0000 (09:53 -0700)]
Introduce RunMachine to manage gpsbabel process. (#699)
* Introduce RunMachine to manage gpsbabel process.
* fix comment
* guard runmachine init state
tsteven4 [Sun, 14 Feb 2021 20:36:57 +0000 (13:36 -0700)]
fix gui usage of duplicate filter. (#695)
the shortname and location options are not exclusive.
this resolves #686.
tsteven4 [Sat, 13 Feb 2021 16:09:58 +0000 (09:09 -0700)]
remove a few old kludges that are no longer needed. (#691)
* remove a few old kludges that are no longer needed.
* clean up upgrade a bit
"GPSBabel Version " doesn't need to be removed from currentVersionIn
in UpgradeCheck::checkForUpgrade,
that is taken care of in MainWindow::findBabelVersion
tsteven4 [Wed, 10 Feb 2021 19:54:26 +0000 (12:54 -0700)]
update readme.md with current continuous integration provider (#672)
* update README for new CI.
* use list for workflows
* appease codacy list item indent
* restore lost newline
* don't mention pre-releases in README.md
tsteven4 [Wed, 10 Feb 2021 19:51:40 +0000 (12:51 -0700)]
remove leftover includes from autotools (#689)
* remove leftovers from autotools
we no longer have config.h, HAVE_CONFIG_H is always false.
* more config.h deletions (from jeeps)
tsteven4 [Wed, 10 Feb 2021 19:26:28 +0000 (12:26 -0700)]
make src/core and jeeps includes relative to top cli directory (#688)
* make jeeps includes relative to cli diretory.
* make src/core includes all relative to top level src dir.
tsteven4 [Sun, 7 Feb 2021 21:43:27 +0000 (14:43 -0700)]
prefer implicitly-defined dtors instead of user dtors with empty bodies. (#685)
Not only is this simpler, it avoids clang-tidy complaining about
warning: class * defines a non-default destructor but does not define a copy
constructor, a copy assignment operator, a move constructor or a move
assignment operator [cppcoreguidelines-special-member-functions]
tsteven4 [Sat, 6 Feb 2021 21:29:11 +0000 (14:29 -0700)]
cleanup FormatLoad class header file. (#684)
clang-tidy modernize-use-default-member-init
This allows the use of the implicitly-defined default ctor.
Use implicitly-defined dtor as well.
tsteven4 [Sat, 6 Feb 2021 17:51:41 +0000 (10:51 -0700)]
further cleanups for Format class header. (#683)
manual fix for typedef found by clang-tidy modernize-use-using
clazy fixes for clazy-function-args-by-ref
clang-tidy fix for modernize-use-default-member-init
tsteven4 [Sat, 6 Feb 2021 13:55:00 +0000 (06:55 -0700)]
use new style connect, i.e. function pointers (#682)
* migrate from old style connects to the new style.
The changes using qOverload were done by hand, the rest were done
with clazy 1.9.
The ones using the TreeAction constructor were not found by clazy
and would require more manual intervention.
Also, I note uic generates old style connects.
* eliminate our TreeAction class in favor of QMenu::addAction method.
It is a mystery to me why we created TreeAction. The QMenu method existed
in Qt 4.3. Documentation before 4.3 is scarce.
QMenu::addAction(const QString &text, const QObject *receiver, const char *member, const QKeySequence &shortcut = 0)
* clazy updates gmapdlg connects.
* add TODOs for Qt6 related to qOverload.
tsteven4 [Fri, 5 Feb 2021 17:01:41 +0000 (10:01 -0700)]
drop support for QtWebKit. (#680)
Our QtWebKit build didn't work any longer on Ubuntu bionic or focal,
but went into an infinite loop if map preview was used.
I observed this behavior with builds of 1.7.0 as well.
Document exisiting gui configuration option disable-mappreview.
I note that latest fedora build spec falls back to QtWebKit on some
architectures where QtWebEngine is not available. This change will
require them to fall back to disabling the map preview instead.
https://src.fedoraproject.org/rpms/gpsbabel/blob/rawhide/f/gpsbabel.spec
QtWebEngine appears to be coming to Qt6 with or after 6.2.
https://bugreports.qt.io/browse/QTBUG-63235
tsteven4 [Fri, 5 Feb 2021 16:48:33 +0000 (09:48 -0700)]
delete FAKE_LANGUAGE_MENU code. (#681)
This code hadn't compiled for a while, and is no longer necessary
to test translations.
tsteven4 [Thu, 4 Feb 2021 22:56:38 +0000 (15:56 -0700)]
replace obsolete and overloaded QProcess signal error(QProcess::ProcessError error) (#679)
with the recommended replacement, QProcess signal errorOccurred(QProcess::ProcessError error).
It seems this should have caused an issue in Qt6, but we hadn't noticed it yet.
tsteven4 [Tue, 2 Feb 2021 13:07:41 +0000 (06:07 -0700)]
fix deprecated-copy waring. (#675)
This fixes
"formatload.cc:127:40: warning: implicitly-declared
‘Format& Format::operator=(const Format&)’ is deprecated [-Wdeprecated-copy]"
Use default member initializers for FormatOption and Format classes.
This allows the use of the default constructor and simplifies the
creation of parameterized constructors.
Use implicit copy constructor for FormatOption and Format classes.
Note the previous copy constructor for the Format class was not
really a copy constructor, it re-initialized readUseCount and writeUseCount.
This was unnecessary. The only place we want to use the copy constructor is
in FormatLoad::getFormats and the instances to be copied have just been
created with one of the Format constructors so the use counts will be zero.
There are plenty of other opportunities where Qt might detach formatList_
and use the copy constructor. Most of these cases are read accesses and
improved const correctness could eliminate the possiblity, i.e. using
QList::at instead of QList::operator[]. A few of these are modifying an
item on the formatList_, and Qt will insist the copy constructor is available
at compile time even if it is never used at run time.
tsteven4 [Mon, 1 Feb 2021 18:40:49 +0000 (11:40 -0700)]
refactoring for cppcheck "The scope of the variable can be reduced" (#677)
* refactoring for cppcheck "The scope of the variable can be reduced"
The c++17 "If Statement with Initializer" often are useful in resovling
these.
* more scope reduction.
* and another.